package com.ykm.jniapp;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends AppCompatActivity {
    private static final String TAG = "MainActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.i(TAG, "getStringFromC: " + JniUtil.getStringFromC());
        JniUtil.encodeArray(array);
        for (int a : array) {
            Log.i(TAG, "array: " + a);
        }
        Log.i(TAG, "s: " + s);
        String encode = JniUtil.encode(s, s.length());
        Log.i(TAG, "encode: " + encode);
        String decode = JniUtil.decode(encode, encode.length());
        Log.i(TAG, "decode: " + decode);
    }
    private String s = "you are greet!";
    int[] array = {1, 2, 3, 4, 5};

}
